import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:sgy_flutter/ble/ble_manager.dart';
import 'package:sgy_flutter/extensions/get.dart';
import 'package:sgy_flutter/gen/assets.gen.dart';
import 'package:sgy_flutter/page/detail/logic.dart';

import '../widget/device_data_view.dart';

class DlsCenterViewOld1618 extends GetView<DetailLogic> {
  const DlsCenterViewOld1618({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
        border: Border.all(
          width: 0,
          color: Get.theme.primaryColor,
        ),
        color: Get.theme.primaryColor,
      ),
      child: // 功率,踏频,左右平衡
          Container(
        decoration: BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.only(
              topLeft: Radius.circular(28), topRight: Radius.circular(28)),
          border: Border(
              bottom: BorderSide(color: Get.theme.primaryColor, width: 6)),
        ),
        padding: EdgeInsets.only(top: 24, bottom: 10, left: 12, right: 12),
        child: Obx(() => Row(
              // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              children: [
                DeviceDataView(
                    imagePath: Assets.image.iconLightning.path,
                    label: "功率/W".tr,
                    value: controller.axoDataModel.value?.power),
                Container(
                  width: 2,
                  color: Get.theme.dividerColor,
                  height: 60,
                ),
                DeviceDataView(
                    imagePath: Assets.image.iconFrequency.path,
                    label: "踏频/RPM".tr,
                    value: controller.axoDataModel.value?.cadence),
                Container(
                  width: 2,
                  color: Get.theme.dividerColor,
                  height: 60,
                ),
                DeviceDataView(
                    imagePath: Assets.image.iconLr.path,
                    label: "左右平衡/%".tr,
                    value: controller.axoDataModel.value?.balance),
              ],
            )),
      ),
    );
  }

}
